import { hasPermi, Log } from "@/decorator/index";
import { Constants, AjaxResult } from "@/util/index";
import { Controller, Get } from "@midwayjs/core";

@Controller("/")
export class SysLoginUserController {

    @Log(__filename, { title: "1111111" })
    @hasPermi("limit")
    @Get("/login")
    login() {

        let ajax: AjaxResult = AjaxResult.error();
        ajax.put(Constants.TOKEN, "xxxxxxxxxxxxxxxxxxxxxxxxx")

        return ajax;
    }

    @Log(__filename, { title: "1111111" })
    @hasPermi("limit")
    @Get("/:id")
    login1() {

        let ajax: AjaxResult = AjaxResult.error();
        ajax.put(Constants.TOKEN, "xxxxxxxxxxxxxxxxxxxxxxxxx")

        return ajax;
    }
}